package com.jd.jerry.study.controller;

import com.jd.jerry.study.service.SearchServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.lang.reflect.InvocationTargetException;

/**
 * Created by chede on 2017/7/17.
 */
@Controller
public class MethodController {
    @Autowired
    private SearchServiceImpl searchService;

    @RequestMapping("/abc")
    @ResponseBody
    public String test() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        searchService.methodA();
        return "abc";
    }

    @RequestMapping("/abcd")
    @ResponseBody
    public String test2() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        searchService.methodB("adfasd");
        return "abc2";
    }
}
